<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<html>
<head>
<title>
Clientes
</title>
<link href="css/estilos.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#ffffff" onLoad="window.focus(); document.getElementById('str_search').focus();">
  <html:form action="/clientecAction.do" method="get" >
    <table width="100%" border="0" cellpadding="0" cellspacing="1" class="tabla">
      <tr>
        <td colspan="3" class="encabezadoTabla" align="center" height="20" valign="top">
          <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td width="40%" height="60%" align="right"><img src="images/img_loginFlecha.gif" width="17" height="23" alt=""/></td>
              <td width="60%" class="font_general"><strong>&nbsp;&nbsp;Listado de Clientes</strong></td>
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td colspan="3" valign="top" height="20">
          <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td align="center" class="font_general colorLabel">Codigo/Cliente</td>
              <td align="left" class="colorCampo font_general"><html:hidden property="action" value="listadoCli"/><html:text property="str_search" styleClass="textfield" maxlength="50" size="60"></html:text></td>
              <td align="center" class="colorCampo font_general"><html:submit styleClass="boton">Buscar</html:submit></td>
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td width="50" align="center" class="encabezado_col font_general">Insertar</td>
        <td width="50" align="center" class="encabezado_col font_general">Codigo</td>
        <td width="450" align="center" class="encabezado_col font_general">Descripcion</td>
      </tr>
      <logic:present name="arr_cliente">
        <logic:notEmpty name="arr_cliente">
          <logic:iterate id="cliente" name="arr_cliente">
            <bean:define id="bool_row" name="cliente" property="bool_fila"></bean:define>
            <tr>
              <td width="50" align="center" class="<logic:equal name="bool_row" value="true">im</logic:equal>par font_general">
                 <logic:equal name="cliente" property="bol_clienteCritico" value="true">
                   <html:link name="cliente" property="map_param" action="/clientecAction"><img src="images/img_add.gif" width="15" height="15" border="0" alt="Seleccionar Cliente ..."/></html:link>
                 </logic:equal>
                 <logic:notEqual name="cliente" property="bol_clienteCritico" value="true">
                   <html:link href="#"><img src="images/img_add.gif" width="15" height="15" border="0" alt="Seleccionar Cliente ..." onclick="alert('El cliente <bean:write name="cliente" property="str_codgoCli"/> ya es Cliente Critico');"/></html:link>
                 </logic:notEqual>
              </td>
              <td width="50" align="center" class="<logic:equal name="bool_row" value="true">im</logic:equal>par font_general"><bean:write name="cliente" property="str_codgoCli"/></td>
              <td width="450" class="<logic:equal name="bool_row" value="true">im</logic:equal>par font_general">&nbsp;&nbsp;<bean:write name="cliente" property="str_descripcionCli"/></td>
            </tr>
          </logic:iterate>
        </logic:notEmpty>
      </logic:present>
    </table>
  </html:form>
</body>
</html>
